function touchEndCallback($this) {
  // 跨列
  var col = Math.round(toPoint.x / tableParam.tdWidth);
  // 跨行
  var row = Math.round(toPoint.y / tableParam.tdHeight);
  var oldRow = parseInt($this.attr("data-oldrow"));
  var oldCol = parseInt($this.attr("data-oldcol"));
  // 四舍五入添加动画
  endPoint.x = col * tableParam.tdWidth;
  endPoint.y = row * tableParam.tdHeight;

  // 或者移动之后在格子内
  var nowRow = oldRow + row;
  var nowCol = oldCol + col;
  var $movePic = $(
    '.move-ele[data-col="' + nowCol + '"][data-row="' + nowRow + '"]'
  );

  $this.css({
    transition: "ease 300ms",
    transform: "translate3d(" + endPoint.x + "px," + endPoint.y + "px, 0)"
  });

  // 移到的格子已有宠物时调换位置
  if ($movePic.length && $movePic.attr("id") !== $this.attr("id")) {
    clearInterval(interval[$this.attr("id")]);
    interval[$this.attr("id")] = null;
    clearInterval(interval[$movePic.attr("id")]);
    interval[$movePic.attr("id")] = null;

    // 同类型 合并
    var tNum = parseInt($this.attr("data-num"));
    var mNum = parseInt($movePic.attr("data-num"));
    if (tNum === mNum) {
      /* ------------临时代码测试合成分红鼠 --------------*/
      var random = Math.random()
      if (random >= .5) {
        $this
          .attr("data-num", 39)
          .find(".animal")
          .attr("src", "./imgs/animal/m" + 39 + ".png");
        $this.find(".num").text(39);
        $this.prepend("<span class='timer hide'></span>")

        // 倒计时
        var timerELe = $this.find('.timer');

        function timerCallback() {
          $('.fen-wrapper, .mask').show();
        }

        TimeDown(3, timerELe, timerCallback)
      } else {
        $this
          .attr("data-num", tNum + 1)
          .find(".animal")
          .attr("src", "./imgs/animal/m" + (tNum + 1) + ".png");
        $this.find(".num").text(tNum + 1);
      }

      var offset = $movePic.offset();
      $movePic.remove();

      $this.hide();
      $("#addimg").css({
        left: offset.left + "px",
        top: offset.top + 8 + "px",
        opacity: 1,
        "z-index": 3
      });
      $("#add")[0].play();
      setTimeout(function () {
        $("#addimg").css({
          left: 0,
          top: 0,
          opacity: 0,
          "z-index": -1
        });
        $this.show();
      }, 200);

      // 不同类型 移动
    } else {
      var nrow = $this.attr("data-row");
      var ncol = $this.attr("data-col");
      var mrow = $movePic.attr("data-oldrow");
      var mcol = $movePic.attr("data-oldcol");

      $movePic.css({
        transition: "ease 300ms",
        transform: "translate3d(" +
          (ncol - mcol) * tableParam.tdWidth +
          "px, " +
          (nrow - mrow) * tableParam.tdHeight +
          "px, 0)"
      });
      $movePic
        .attr("data-row", nrow)
        .attr("data-col", ncol)
        .attr("id", "m" + nrow + ncol);

      // 添加之前先清除
      clearInterval(interval["m" + nrow + ncol]);
      interval["m" + nrow + ncol] = null;
      addInterval($movePic);
    }
  } else {
    clearInterval(interval[$this.attr("id")]);
    interval[$this.attr("id")] = null;
  }
  $this
    .attr("data-row", nowRow)
    .attr("data-col", nowCol)
    .attr("id", "m" + nowRow + nowCol);

  // 添加之前先清除
  clearInterval(interval["m" + nowRow + nowCol]);
  interval["m" + nowRow + nowCol] = null;
  addInterval($this);
}